package com.kalaqia.photo.selector.library;

import android.os.Bundle;
import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.support.design.widget.BottomSheetDialogFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

/**
 * function:
 * project:PhotoSelector
 * describe:
 * created owner:kalaqia 421407393@qq.com
 * created date:2017/10/18 0018 23:18
 */
//<editor-fold desc="version update log">
// updare owner:kalaqia  421407393@qq.com
// update datetime:2017/10/18 0018 23:18  
// update remark:
//</editor-fold>
public class PhotoSelectorBottomDialog extends BottomSheetDialogFragment {

    @LayoutRes
    private Integer layoutRes;

    private View rootView;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        if (layoutRes == null)
            return super.onCreateView(inflater, container, savedInstanceState);
        rootView = inflater.inflate(layoutRes, container, false);
        return rootView;
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        rootView = null;
    }
}
